///@file Quad4.h
///@brief Declaration of the class representing a quadrangle element with 4 nodes
///@author Arnaud Duval
///@version 0.0
///@date 2009/11/03


#ifndef QUAD4_H
#define QUAD4_H

#include "Element.h"
#include "MaterialPoint.h"

///@class Quad4
///@brief Class defining a quadrangle element with 4 nodes
class Quad4: public Element
{
	private:
		///@brief width of the element
		double width;
        ///@brief Gauss points of the element
        MaterialPoint gaussPoints[4];
	public:
		///@brief Default constructor
		Quad4() : Element() {}
		///@brief Constructor specifying the nodes
		Quad4(Node*, Node*, Node*, Node*);
		///@brief Constructor with arguments
		Quad4(Node*, Node*, Node*, Node*, Material*, double);
        ///@brief Destructor
        virtual ~Quad4();
		///@brief Update specific values of element
		virtual void Update();
		///@brief compute nodal residual from nodal DOF increment
		virtual void Equilibrate(const Vector&, Vector &, Matrix &);
        ///@brief Compute nodal residual from nodal DOF increment with similarities to Abaqus UEL
        virtual void UEL(Vector&, Matrix&, Vector&, const Vector&, const Vector&);
        ///@brief Compute displacements interpolation matrix at a given intgration point
		virtual Matrix N(unsigned int);
		///@brief Compute strain matrix operator at a given integration point
		virtual Matrix B(unsigned int);
        ///@brief Compute transformation Jacobian matrix at a given integration point
        ///@warning The method should be virtual
        Matrix Jacobian(unsigned int);
        ///@brief Return coordinates of Gauss point
        void GetGaussCoords(unsigned int, double&, double&);


};


#endif
